package zz.demo.springCloud.feignClient;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import feign.Headers;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.http.client.support.BasicAuthorizationInterceptor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import zz.demo.springCloud.entity.User;

/**
 * Created by zhangzheng on 2017-6-9.
 */
@FeignClient(value = "user-service"
//        ,configuration = FeignConfiguration.class
)
public interface UserFeignClient {
    @RequestMapping(value = "/user/{id}" ,method = RequestMethod.GET)
    User getUser(@PathVariable("id") Long id);

    @GetMapping(value = "/addUser")
    User addUser(User user);

    @GetMapping(value = "/add/{a}/{b}")
    Integer add(@PathVariable("a")Integer a,@PathVariable("b")Integer b);
}
